// 初始化
jQuery(function() {
	// grid
	create_data_grid(columns);
});

function create_data_grid(columns) {
	gxc.grid.create({
		name : "data_grid",
		url : url_local + "/datacenter/dataQuery/queryGrid.do",
		withCheckbox : false,
		withRownum : false,
		stripeRows : true,
		stripeOverRow : false,
		withPagebar : true,
		pageSize : 20,
		renderTo : "#data_grid",
		fieldSort : null,
		loadDataNow : false,
		columns : columns
	});
	query_data();
}

function renderOperate(item) {
	var operate = "<a  href='javascript: view_user(\"" + item.id
			+ "\")'>查看详情</a>";
	return operate;
}

function query_data() {
	gxc.grid.data_grid.params = null;
	gxc.grid.data_grid.params = gxc.form.getParams("#frm");
	gxc.grid.data_grid.pageCurrent = 1;
	gxc.grid.data_grid.reload();
}

function reload() {
	gxc.grid.data_grid.reload();
}

function view_detail(id) {
	// window.open(url_local + "/system/user/view.do?id=" + id, "_blank");
	alert("view_detail");
}
